#ifndef _SIMHASH_H_
#define _SIMHASH_H_
#include <iostream>
#include <unordered_map>
#include "WebPage.h"
#include "Simhasher.hpp"
#include "../Configuration.h"
#include <string>
#include <set>
using std::set;
using std::string;
using std::unordered_map;
using namespace simhash;
class SimHash
{
public:
    SimHash(Configuration *conf);
    ~SimHash();
    // 添加网页id和网页
    void addPage(int id,WebPage page);
    //去重，返回_pageMap
    unordered_map<int, WebPage>& RemoveDulPage();


private:
    
    // 存储网页id和对应哈希值和网页
    unordered_map<int, uint64_t> _simhashMap;
    //存储网页id和对应网页
    unordered_map<int, WebPage> _pageMap;
    //哈希库对象
    Simhasher _simHasher;
    
};

#endif